﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RayTracing
{
    class BasicAnimation : Scene
    {
         // Camera variables
        P3 cameraPosition;
        public float distance;

        public Color backGroundColor;

        // Lights in Scene        
        public AmbientLight ambientLight;
        public DirectionalLight directionalLight;

        //Geometries
        Geometry sphere;
        Geometry sphere2;

        //Textures
        Texture uv;
        Texture green;
        Texture red;

        //Skins
        Skin nonreflective;
        Skin mirror;

        // Scene Objecets
        SceneObject greenSphere;
        SceneObject sphereObj;


        public override string sceneName()
        {
            return "Basic Animation";
        }

        public override void createScene(out List<SceneObject> objects, out List<Light> lights, float time, float slider1, float slider2, float slider3, float slider4, float slider5)
        {
            // every scene needs these two lines
            objects = new List<SceneObject>();
            lights = new List<Light>();

            // Camera variables
            cameraPosition = new P3(0, -5, 0);
            distance = -5;
            backGroundColor = Color.BLACK;

            // Lights in Scene
            ambientLight = new AmbientLight(new Color(.4f, .4f, .4f));
            directionalLight = new DirectionalLight(new P3(slider1, slider3, slider2), new Color(1.8f, 1.8f, 1.8f));
            //add Lights to the lights list
            lights.Add(ambientLight);
            lights.Add(directionalLight);

            //geometries
            sphere = new Sphere(new P3(0, 9, 0), 1);
            sphere2 = new Sphere(new P3(-2, 10, -2), 1);
            //textures
            uv = new ImageTexture(Properties.Resources.uvImage);
            green = new SolidTexture(Color.GREEN);
            red = new SolidTexture(Color.RED);
            //skins
            nonreflective = new NonReflective();
            mirror = new Mirror();
            // Scene Objects
            greenSphere = new SceneObject(sphere, red, nonreflective);
            sphereObj = new SceneObject(sphere2, uv, nonreflective);

            //add objects to theScene
            objects.Add(greenSphere);
            objects.Add(sphereObj);


        }

        public override String[] SliderLabels()
        {
            String[] sliderLabels = { "Dlight X", "Dlight Z", "Dlight Y", "Not Used", "Not Used" };
            return sliderLabels;
        }

        public override AnimationParamaters  getAnimationParamaters()
        {
 	        return base.getAnimationParamaters();
        }

    }
}
